<% content_for :headtag do %>
  <%= auto_discovery_link_tag(:rss, messages_url(:rss)) %>
 	<%= render :partial => 'shared/page_player' %>
  <script type="text/javascript">
    var zipcodes = <%= @messages.map {|m| [m.zipcode, m.lat, m.lng]}.compact.uniq.to_json %>;
  </script>
  <%= javascript_include_tag 'big_map.js' %>
<% end %>


<div id="screencast">
  Screencast created by <%= link_to "Dave Fisher", "http://whatisnoise.com" %>.
  <%=link_to_function "Hide screencast", "$('#screencast').hide()"  %>

  <embed src="http://blip.tv/play/AfbOFAA" type="application/x-shockwave-flash" width="705" height="455" allowscriptaccess="always" allowfullscreen="true"></embed>
</div>


<div id="bigMap" style="margin-top: 4px;width:705px;height: 380px; border: 3px solid #666;"></div>

<p style="margin-bottom: 7px">
  Click on a map marker to hear recent messages from that location.
  <span id="showAllLink"><%= link_to_function "Show all recent messages", "$('.message').show()" %></span>

</p>

<p>Watch the <%= link_to_function  "screencast introduction", "$('#screencast').toggle('slow')" %>. We just launched, so please call and leave voice messages. We need to bootstrap some compelling content into this website. Thanks for your support!</p>


<%= render :partial => "messages/messages", :object => @messages %>


<div id="homepageIntro">
<%= RDiscount.new(<<END
### What is SpeakForChange?

Communicating with our representatives in Congress is critical for our democracy.
But there are two problems people face when they want do this.  First, most
people don't know offhand how to contact their representative.  And second,
there's no way for other concerned citizens to hear what you say to your
representative or to join in on the dialogue.

SpeakForChange takes on both of these problems.

SpeakForChange simplifies the process when you want to say something to
Congress. All you need is a phone and a zipcode. Just dial our toll free number
and follow the prompts to find your representative, and you'll be able to leave
her a voice message in no time.

SpeakForChange also opens up this conversation by posting your voice message
on our website for anyone to listen to and comment on. You can think of this as
a way of cc'ing the rest of America when you have something to say to Congress. 
It's a new kind of public forum. It's public voicemail for democracy.

Call and speak your mind today.  

END
).to_html %>
</div>
<%= image_tag 'logo.png' %>

<% content_for :sidebar do %>
  
<% end %>

<% content_for :screencast do %>

<% end %>
